package org.thanos.demo.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.thanos.demo.model.Demo;

import java.util.List;

public interface DemoDao extends JpaRepository<Demo, Integer> {

    @Query(value = "SELECT id, name FROM DEMO WHERE id IN :ids", nativeQuery = true)
    List<Demo> selectByIds(@Param("ids") List<Integer> ids);
}
